package com.storage.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.storage.common.enums.ShowStockType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 用户-代理商表 storage_user_agent
 *
 * @author storage
 * @date 2019-08-18
 */
@ApiModel(value = "用户-代理商对象")
public class StorageUserAgent implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 用户-代理商id
     */
    @ApiModelProperty(value = "用户-代理商id")
    private Long id;
    /**
     * 用户id
     */
    @ApiModelProperty(value = "用户id")
    private Long userId;
    /**
     * 代理商id
     */
    @ApiModelProperty(value = "代理商id")
    private Long agentId;
    /**
     * 代理商与用户关联关系(1-代理商是当前用户的下级,2-代理商是当前用户的上级)
     */
    @ApiModelProperty(value = "代理商与用户关联关系(1-代理商是当前用户的下级,2-代理商是当前用户的上级)")
    private Integer level;
    /**
     * 代理商是否可以查看用户库存(0-代理商不可以查看用户库存;1-代理商可以查看用户库存)
     */
    @ApiModelProperty(value = "代理商是否可以查看用户库存(0-代理商不可以查看用户库存;1-代理商可以查看用户库存)")
    private Integer show;
    /**
     * 代理商与用户结算金额(info: 负数-我欠代理商钱;零-互不相欠;正数-代理商欠我钱)
     */
    @ApiModelProperty(value = "代理商与用户结算金额(info: 负数-我欠代理商钱;零-互不相欠;正数-代理商欠我钱)")
    private BigDecimal paymentMoney;
    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date modifyTime;
    /**
     * AGENT-代理商与代理商管理;SHOP-店铺与代理商管理
     */
    @ApiModelProperty(value = "AGENT-代理商与代理商管理;SHOP-店铺与代理商管理")
    private String type;
    /**
     * 代理商可以查看当前用户的品牌列表
     */
    @ApiModelProperty(value = "代理商可以查看当前用户的品牌列表")
    private String acceptBrand;

    /** 扩展字段 */
    /**
     * 代理商姓名
     */
    @ApiModelProperty(value = "代理商姓名")
    private String agentName;
    /**
     * 代理商邀请码(info: 邀请码即代理商的电话号码)
     */
    @ApiModelProperty(value = "代理商邀请码(info: 邀请码即代理商的电话号码)")
    private String agentInvitationCode;
    /**
     * 代理商地址
     */
    @ApiModelProperty(value = "代理商地址")
    private String address;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    public StorageUserAgent() {
    }

    public StorageUserAgent(Long userId, Long agentId, Integer level, String type, String acceptBrand) {
        this.userId = userId;
        this.agentId = agentId;
        this.level = level;
        this.paymentMoney = new BigDecimal(0);
        this.show = ShowStockType.AGREE.getValue();
        // 设置为代理商与代理商的关联关系
        this.type = type;
        this.acceptBrand = acceptBrand;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setAgentId(Long agentId) {
        this.agentId = agentId;
    }

    public Long getAgentId() {
        return agentId;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public Integer getLevel() {
        return level;
    }

    public void setPaymentMoney(BigDecimal paymentMoney) {
        this.paymentMoney = paymentMoney;
    }

    public BigDecimal getPaymentMoney() {
        return paymentMoney;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }

    public Date getModifyTime() {
        return modifyTime;
    }

    public String getAgentName() {
        return agentName;
    }

    public void setAgentName(String agentName) {
        this.agentName = agentName;
    }

    public Integer getShow() {
        return show;
    }

    public void setShow(Integer show) {
        this.show = show;
    }

    public String getAgentInvitationCode() {
        return agentInvitationCode;
    }

    public void setAgentInvitationCode(String agentInvitationCode) {
        this.agentInvitationCode = agentInvitationCode;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getAcceptBrand() {
        return acceptBrand;
    }

    public void setAcceptBrand(String acceptBrand) {
        this.acceptBrand = acceptBrand;
    }
}
